function user(state={username:'',isLogin:false,token:''},action){
  switch (action.type) {
    case 'setuser':
     state= action.payload;
     return state
     case 'deleteuser':
       state={username:'',isLogin:false,token:''}
       return state
    default:
      return state
  }
}
export default user